﻿<UserControl x:Class="SSDM.SqlServer.SqlServerEntry"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
               xmlns:Translator="clr-namespace:SSDM.Bases"
                 xmlns:Localizer="clr-namespace:SSDM.Bases"
    xmlns:my="clr-namespace:WPFCommonControl;assembly=WPFCommonControl">
    <Grid>
        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
            <StackPanel Orientation="Horizontal" Margin="50,2,0,0">
                <my:SqlServerLoginControl  Name="sqlServerLoginControl1" />
                <StackPanel Margin="0,10,0,0">
                    <Button x:Name="butEmulateSqlServerInstance" Width="Auto"
                            Content="{Localizer:Translate TitlePopulateSqlServerInstance}" 
                            HorizontalAlignment="Left" Click="butEmulateSqlServerInstance_Click"
                            Margin="5"></Button>
                    <Button Width="125" Height="40" x:Name="butConnect"
                            Content="{Localizer:Translate ButtonOpen}" HorizontalAlignment="Left"
                            Margin="0 50 0 0 "></Button>
                    <TextBlock Text="{Localizer:Translate TitleFunctionList}"/>
                    <ComboBox x:Name="cmbFuncList" Margin="0 5 0 0" IsEnabled="{Binding ElementName=butConnect,Path=IsEnabled}" Text="{Localizer:Translate TitleFunctionList}">
                        <ComboBoxItem>
                            <ComboBoxItem.Content>
                                <Button Width="125" x:Name="butCreate"
                            Content="{Localizer:Translate ButtonCreateDatabase}" Click="butCreateDb_Click"/>
                            </ComboBoxItem.Content>
                        </ComboBoxItem>
                        <ComboBoxItem>
                            <ComboBoxItem.Content>
                                <Button Width="125" x:Name="butBackup"
                            Content="{Localizer:Translate ButtonBackupDatabase}" 
                             Click="butBackupDb_Click"/>
                            </ComboBoxItem.Content>
                        </ComboBoxItem>
                    </ComboBox>

                    
                </StackPanel>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <Expander Header="{Localizer:Translate LabelUseConnectionStringDirectly}"  Margin="50,2,10,0">
                        <StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Localizer:Translate LabelConnectionString}"></TextBlock>
                            <TextBox x:Name="txtConnStr" Width="500" Height="60" TextWrapping="Wrap" Margin="10,0,0,0"/>
                           
                            </StackPanel>
                        <Button Width="80" Margin="10" x:Name="butConnectWithConStr_Directly" Click="butConnectWithConStr_Directly_Click"
                                Content="{Localizer:Translate ButtonOpen}" Height="20">
                            
                        </Button>
                    </StackPanel>
                </Expander>  
            </StackPanel>
        </StackPanel>
    </Grid>
</UserControl>
